From f6a895030fc38b311b336bbbf0a101b7055b2bf5 Mon Sep 17 00:00:00 2001
From: Szczepan Zalega <szczepan@nitrokey.com>
Date: Thu, 28 Nov 2019 18:06:07 +0100
Subject: [PATCH 12/25] udev/u2f.conf: add Nitrokey FIDO2

Signed-off-by: Gustavo B. Schenkel <gustavo.schenkel@gmail.com>
---
 70-u2f.rules    | 5 +++--
 u2f.conf.sample | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/70-u2f.rules b/70-u2f.rules
index c4d836e..2884456 100644
--- a/70-u2f.rules
+++ b/70-u2f.rules
@@ -46,8 +46,9 @@ KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2abe", ATTRS{idProduct
 # Thetis Key
 KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1ea8", ATTRS{idProduct}=="f025", TAG+="uaccess", GROUP="plugdev", MODE="0660"
 
-# Nitrokey FIDO U2F
-KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="20a0", ATTRS{idProduct}=="4287", TAG+="uaccess", GROUP="plugdev", MODE="0660"
+# Nitrokey FIDO U2F, Nitrokey FIDO2
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="20a0", ATTRS{idProduct}=="4287|42b1", TAG+="uaccess", GROUP="plugdev", MODE="0660"
+
 
 # Google Titan U2F
 KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="5026", TAG+="uaccess", GROUP="plugdev", MODE="0660"
diff --git a/u2f.conf.sample b/u2f.conf.sample
index 6d89540..7c4e38b 100644
--- a/u2f.conf.sample
+++ b/u2f.conf.sample
@@ -100,13 +100,13 @@ notify 100 {
 	action "chgrp u2f /dev/$cdev; chmod g+rw /dev/$cdev";
 };
 
-# Nitrokey FIDO U2F
+# Nitrokey FIDO U2F, Nitrokey FIDO2
 notify 100 {
 	match "system"		"USB";
 	match "subsystem"	"DEVICE";
 	match "type"		"ATTACH";
 	match "vendor"		"0x20a0";
-	match "product"		"0x4287";
+	match "product"		"(0x4287|0x42b1)";
 	action "chgrp u2f /dev/$cdev; chmod g+rw /dev/$cdev";
 };
 
-- 
2.32.0

